def mul_div(exp):

    if '*' in exp:
        a,b=exp.split('*')
        return float(a)*float(b)
    if '/' in exp:
        a, b = exp.split('/')
        return float(a) / float(b)


res=mul_div('3*5.2')
print(res)
import re
exp='1+3*4*5/6'
def remove_muldiv(exp):
    while True:
        ret=re.search('\d+(\.\d+)?[*/]-?\d+(\.\d+)?',exp)
        if ret:
            son_exp=ret.group()
            res=mul_div(son_exp)
            print(res)
            exp=exp.replace(son_exp,str(res))
            print('-->',exp)
        else:break
    return exp
ret = remove_muldiv('1+3*4*5/6-4-7')
print(ret)





